const MyPromise = require('./MyPromise')

let p2 = new MyPromise(function(resolve,reject){
    resolve('成功')
});
let p3 = p2.then(value=>{
    console.log(value)
    return p3;
});

p3.then(value=>{
    console.log(value)
},reason =>{
    console.log(reason)
    console.log(reason.message)
})